home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
UTILFILE
/
JBTTOOLS.LZH
/
JBT1.EXE
/
COPYCON.DOC
< prev
next >
Wrap
Text File
|
1991-06-12
|
35KB
|
925 lines
CopyCon
Version 5.00
December 1990
by
John E. Bean, P.E.
JB Technology Inc.
28701 N. Main St.
Ridgefield, Wa. 98642
TABLE OF CONTENTS
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 1
Limitations . . . . . . . . . . . . . . . . . . . . . . . . . 2
Getting Started . . . . . . . . . . . . . . . . . . . . . . . 3
The Help System . . . . . . . . . . . . . . . . . . . . . . . 5
Editing Commands . . . . . . . . . . . . . . . . . . . . . . . 6
Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Graphic Boxes . . . . . . . . . . . . . . . . . . . . . . . . 11
Line Editor Commands . . . . . . . . . . . . . . . . . . . . . 12
Version Changes . . . . . . . . . . . . . . . . . . . . . . . 13
The JBT ToolBox . . . . . . . . . . . . . . . . . . . . . . . 16
-1-
INTRODUCTION
CopyCon is a program to be used in lieu of the DOS command COPY CON. I
have used COPY CON numerous times in creating batch files and miscel-
laneous small text files.
I have experienced many frustrating moments using COPY CON. I have ac-
cidently overwritten existing files. I have mistyped commands only to
notice them while entering the next line. I have also wanted to have
graphic boxes in my batch files.
CopyCon alleviates all of the above problems. It checks to see if the
specified file exists, and if it does CopyCon provides either loading
the existing file or allows the existing file to be overwritten. Copy-
Con also has full screen editing capability and built in Macros which
aids in creating files.
CopyCon was written in Turbo Pascal 5.0 using routines from Turbo 5.0
Professional.
CopyCon is so easy to use that this manual is not necessary but the
following sections will briefly discuss how to use CopyCon.
-2-
LIMITATIONS
I have designed CopyCon for typical batch files and small text files.
It is not designed to be a text editor! If you need a text editor, Ez-
Doss (A Dos Shell), which I have written, includes a text editor.
There are two main limitations that I designed into this program. They
are:
* The maximum length of a text line is 80 charac-
ters.
* There is no word wrap.
These limitations were done to distinguish the difference between Copy-
Con and a text editor.
-3-
GETTING STARTED
CopyCon is comprised of three (3) files. They are:
* Copycon.exe - The executable program.
* CC.hlp - The help file to CopyCon.
* Copycon.doc - This documentation.
Start CopyCon by issuing the following command at the DOS prompt:
A:>CopyCon <filename>.
As you can see this is identical to using the DOS command COPY CON ex-
cept there is not a space between Copy and Con. If no file name is en-
tered, a window will "pop up" with the drive/subdirectory and the de-
fault file name NONAME.BAT. You will be allowed to enter/edit a new
file name. (See "LINE EDITOR COMMANDS" for available keystrokes in en-
tering the file name.)
Once the program is loaded into memory, the program will check to see
if your computer has a color graphics card. If it does the program will
be displayed in color. You can force CopyCon to be displayed in black
and white by typing in "/bw"
For example; if you wish to create a batch file named "CPY.BAT" and
have CopyCon be in black and white the following is the correct syntax.
A:>CopyCon CPY.BAT /bw
Next the screen will be cleared, ">CopyCon (filename)" will be dis-
played in the upper left hand corner. Several other items will be dis-
played to the right of the file name. They are:
* F1 - Help: A help menu is available simply by de-
pressing the F1 function key. The help
menu provides information on editing
keys and several batch file command.
* F2 - Macros: Depressing the F2 function key will
display the predefined Macros.
* 1,1: The y,x position of the cursor. The y
position is the FILE LINE position.
* INS: If the insert mode is ON then INS will
be displayed.
* [max line]: The number displayed inside the "[ ]"
is the maximum number of lines your
file can have. For a 640K machine, this
should be around 5000.
-4-
If the file entered on the command line exists, a pop up menu will ap-
pear offering the following choices:
* LOAD: This option will load the existing file
and CopyCon can be used to modify the
file.
* OVERWRITE: This option will overwrite the existing
file.
* EXIT: This option will abort CopyCon.
The cursor will be located at the left hand column of your screen. You
are now ready to create/edit your file.
-5-
THE HELP SYSTEM
The on line context sensitive help system is very easy to use,
yet it has several powerful options. The help system is evoked
by depressing function key F1, either a specific topic or a list
of help topics will be displayed.
Related topics (cross reference topics) can be chosen within a
help screen. If there are any cross reference topics, the first
cross reference will be highlighted. Other cross reference
topics, if any, can be selected by highlighting the topic using
the cursor keys. Depressing <Enter> will display the highlighted
topic.
The help system remembers the last nineteen (19) topics
displayed. To display the previous topic simultaneously depress
Alt F1.
When a specific help topic is displayed the following are the
valid keys:
Key Action
--------- ------------------------------------------------
PgUp,PgDn Display the previous or next help page.
Esc Exit the help screen.
Arrow Keys Move highlight bar among the cross reference
topics, if any, displayed on the current page.
<Enter> Select the currently highlighted cross reference
topic, and display the first page of that topic.
F1 Display the CopyCon's Help Topics index. Another
topic can be chosen by moving the highlight bar
using the cursor keys and pressing <Enter>.
Alt F1 Display the help topic most recently selected.
You will find that the help system is so comprehensive, that you
will rarely refer to this manual.
-6-
EDITING COMMANDS
CopyCon provides simple editing commands. These commands can be dis-
played while editing through the Help Menu which is accessed by de-
pressing the F1 function key. The editing commands can be broken into
the following sections.
CURSOR PAD KEYS:
Up Arrow Key:
Depressing the Up arrow key will move the cursor to the
previous line. Depressing the Up arrow key while on line
one will result in the display of an error message.
Down Arrow Key:
Depressing the Down arrow key will move the cursor to
the next line. Depressing the Down arrow key while on
the last line entered will result in the display of an
error message.
Left Arrow Key:
Depressing the Left arrow key will move the cursor one
position left on the current line. Depressing the Left
arrow key while at the leftmost column on the screen
will result in the display of an error message.
Right Arrow Key:
Depressing the Right arrow key will move the cursor one
position right on the current line. Depressing the Right
arrow key while at the rightmost column on the screen
will result in the display of an error message.
Home Key:
Depressing the HOME key will move the cursor to the
leftmost position on the current line.
End Key:
Depressing the END key will move the cursor to the
rightmost position on the current line.
Tab Key:
Depressing the TAB key will move the cursor right eight
(8) spaces.
Shift Tab Key:
Simultaneously depressing the Shift key and the Tab key
will move the cursor left eight (8) spaces.
-7-
Ctrl Home Key:
Simultaneously depressing the Ctrl key and the HOME key
will move the cursor to the top of the screen.
Ctrl End Key:
Simultaneously depressing the Ctrl key and the END key
will move the cursor to the bottom of the screen.
Ctrl PgDn Key:
Simultaneously depressing the Ctrl key and the PgDn key
will move the cursor to the end of the file. If the cur-
sor is already at the end of the file an error message
will be displayed.
Ctrl PgUp Key:
Simultaneously depressing the Ctrl key and the PgUp key
will move the cursor to the top of the file. If the cur-
sor is already at the top of the file an error message
will be displayed.
Ins Key:
Depressing the INS key will toggle the Insert Mode on
and off. If the Insert Mode is on, "INS" will be dis-
played on the top line in inverse video.
Del Key:
Depressing the DEL key will delete the character under
the current cursor position. All characters to the
right will move one space to the left.
FUNCTION KEYS:
F1:
Depressing the F1 function key will display the Help
Menu. The Help Menu will display screens for all the
keys discussed in this section and the following Batch
File commands:
* Echo
* Set
* Rem
* Pause
* Shift
* Goto
* If
* For
-8-
F2:
Depressing the F2 function key will display a listing of
all the built in Macros available in this program.
F3:
Depressing the F3 function key will copy the previous
line. (The tutorial will show how useful this can be)
F4:
Depressing the F4 function key will center the current
line on the screen. This feature is multifunctioned. If
the line starts with "REM" or "ECHO" the centering will
be offset to accommodate for those words. (The tutorial
will show how this works)
F6:
Depressing the F6 function key will save the file and
exit the program.
SHIFT F6:
Simultaneously depressing the SHIFT key and F6 function
will save the file and allow editing to continue.
F7:
Depressing the F7 function key will insert a new line at
the current cursor position.
F8:
Depressing the F8 function key will delete the current
line.
F9:
Depressing the F9 function key will print the file.
SHIFT F9:
Simultaneously depressing the SHIFT key and F9 function
will print the marked block.
OTHER KEYS:
TAB:
Depress the TAB key will move the cursor eight (8) posi-
tions to the right.
SHIFT TAB:
Simultaneously depressing the SHIFT key and the TAB key
will move the cursor eight (8) positions to the left.
ESC:
Depressing the ESC key will abort CopyCon. Once the ESC
key has been depressed, CopyCon will ask if you are sure
you wish to leave CopyCon. If you do, depress the "Y"
key and if you do not simply depress any other key.
-9-
ALT -:
Simultaneously depressing the ALT key and the MINUS key,
located next to the 0 key, will allow multiple lines of
text to be marked as a block which can be inserted at
another location in the file.
Once the ALT MINUS key combination has been depressed, a
"pop up" window will be displayed asking how many lines
will be included in the block. Enter the proper number
(0 if you do not want any) and depress <Enter>. The
lines of text in the block will be displayed in a dif-
ferent color.
ALT +:
Simultaneously depressing the ALT key and the PLUS key,
located next to the BACKSPACE key, will insert the pre-
viously marked block in the current line.
ALT Z:
Simultaneously depressing the ALT key and the letter Z
will flush (unmark) the block.
ALT A:
Simultaneously depressing the ALT key and the letter A
will pop up a window containing ASCII characters that
can be inserted into your file.
Use the ARROW KEYS to highlight the desired ASCII char-
acter. When the desired ASCII character is highlighted,
depress the <Enter> key.
Another window will pop up. This will ask you how many
times do you want the selected character to be repeated.
Enter the number (0 for none) and depress the <Enter>
key.
CopyCon will insert the ASCII character at the current
cursor position.
ALT B:
Simultaneously depressing the ALT key and the letter B
will pop up the Box Builder (Registered Version Only).
The Box Builder allows a box with shading and text to be
inserted into your file.
Enter the data and the Box Builder will do the rest.
This is probably the biggest time saver of the program.
-10-
MACROS
CopyCon has built in Macros. What are Macros? Macros are a character
or a series of characters displayed on the screen when a designated key
or two designated keys are simultaneously depressed. A list of Macros
can be displayed during editing by depressing the F2 function key. The
Macros in CopyCon can be divided into two categories. They are:
BATCH FILE COMMANDS:
CopyCon has assigned several of the most commonly used batch file com-
mands to key combinations. They are:
Alt C:
Simultaneously depressing the Alt key and the "C" key
will display "copy " on the screen.
Alt E:
Simultaneously depressing the Alt key and the "E" key
will display "echo " on the screen.
Alt F:
Simultaneously depressing the Alt key and the "F" key
will display "for %% in ( ) do " on the screen.
Alt G:
Simultaneously depressing the Alt key and the "G" key
will display "goto " on the screen.
Alt I:
Simultaneously depressing the Alt key and the "I" key
will display "shift " on the screen.
Alt L:
Simultaneously depressing the Alt key and the "L" key
will display "cls " on the screen.
Alt P:
Simultaneously depressing the Alt key and the "P" key
will display "path " on the screen.
Alt R:
Simultaneously depressing the Alt key and the "R" key
will display "rem" on the screen.
Alt S:
Simultaneously depressing the Alt key and the "S" key
will display "erase" on the screen.
-11-
GRAPHIC BOXES:
Many times boxes look good in batch files. CopyCon has established Mac-
ros for both single and double sided boxes. The following will describe
the keys used to print the box characters on the screen.
SINGLE LINED BOX:
Alt F1 - Upper Left Hand Corner
Alt F2 - Upper Right Hand Corner
Alt F3 - Lower Left Hand Corner
Alt F4 - Lower Right Hand Corner
Alt F5 - Horizontal Line
Alt F6 - Vertical Line
Alt F7 - Upper Horizontal Cross
Alt F8 - Lower Horizontal Cross
Alt F9 - Left Vertical Cross
Alt F10- Right Vertical Cross
Alt 6 - Center Cross
DOUBLE LINED BOX:
Ctrl F1 - Upper Left Hand Corner
Ctrl F2 - Upper Right Hand Corner
Ctrl F3 - Lower Left Hand Corner
Ctrl F4 - Lower Right Hand Corner
Ctrl F5 - Horizontal Line
Ctrl F6 - Vertical Line
Ctrl F7 - Upper Horizontal Cross
Ctrl F8 - Lower Horizontal Cross
Ctrl F9 - Left Vertical Cross
Ctrl F10- Right Vertical Cross
Alt 5 - Center Cross
SHADING:
There are several characters that are commonly used for "shading"
boxes. CopyCon provides Macros for four (4) of these characters. De-
pressing Alt 1, Alt 2, Alt 3 or Alt 4 will insert a "shading" character
on the screen.
-12-
LINE EDITOR COMMANDS
The Line Editor is used when entering a new file name. The Line Edi-
tor has many features which allow flexibility when entering the file
name. The editing commands are:
Key Description
<Enter> Accept Line
Esc Quit without changing line
Left Arrow Cursor left one character
Right Arrow Cursor right one character
Ctrl Left Arrow Cursor left one word
Ctrl Right Arrow Cursor right one word
Home Cursor to beginning of line
End Cursor to end of line
Del Delete character under cursor
Backspace Delete character left of cursor
Ctrl End Delete to end of line
Ctrl Y Delete entire line
Ctrl Home Delete from beginning of line
Ctrl T Delete word to right of cursor
Ins Toggle insert mode
Ctrl R Restore original contents of line
When entering a string, if the first key you depress is any letter,
or number the default string will disappear. If you wish to use
part of the default string the first character must be one of the
keys listed above.
-13-
VERSION CHANGES
Version 5.00
This version is a major update. The new features are:
* The Box Builder (Registered Version Only). This
allows boxes to be inserted into the file by
answering several questions. A real time saver.
* Print File/Print Block. The file can be printed by
depressing function key F9. The marked block can be
printed by simultaneously depressing the SHIFT key
and function key F9.
* Save and continue. Simultaneously depressing the
SHIFT key and function key F6, will save the file and
allow editing to continue.
* Content sensitive help. A whole new help system has
been included in this version. I spent a lot of time
preparing the help system to provide a tutorial on
batch files.
* GETKEY.COM, GETFKEY.COM. These two small programs can
be used in batch files to get a key from the keyboard
and allow the IF ERRORLEVEL batch file subcommand to
branch to the appropriate area of the batch file.
* STATUS.BAT, MENU.BAT. These are two sample batch
files I have included with the program. STATUS.BAT
will capture information from your system and then
display it. MENU.BAT is a menuing system that can
be modified to use with your computer. It uses
GETFKEY.COM.
Enhancements to existing features.
* Block commands. Added better error checking.
* Delete line. Will not allow a line to be deleted from
an empty file.
Version 4.12
* Hopefully I finally fixed the backspace bug.
Version 4.10 has changed the following:
* Fixed a bug in the backspace feature.
* Fixed a bug when deleting the last line of the file.
CopyCon WILL NOT delete a line of a one line file.
Version 4.00 has changed the following:
* Added the feature of entering a file name if no file
name is entered on the command line.
* Fixed a bug in line deletion. If you put your cursor
on line 1 and deleted each line, using F8, after the
last line was deleted the program would freeze. This
is not good! Therefore I fixed it.
-14-
Version 3.60 has changed the following:
* Added the "Insert ASCII Character". This will allow
ASCII characters not on the keyboard to be inserted
into the file.
Version 3.52 has changed the following:
* Fixed bug when you exit when nothing was entered in a
new file.
Version 3.50 has changed the following:
* Fixed bugs with the delete line function. Sometimes
the last line would be lost when saved.
* Added "BLOCK" functions. I got so many requests that
I added some minor block functions. You can now mark
several lines of text, insert text and flush the
buffer. You have to enter the number of lines that
you want in your block. I feel that is reasonable be-
cause this program is designed for small files and by
doing this way, there was minimum code to be added,
thus keeping the program as small as possible.
Version 3.25 has changed the following:
* Backup files are now created with an extension of .BAK.
* Miscellaneous bugs are fixed.
Version 3.10 has changed the following:
* Fixed a bug in scrolling up multiple screen files.
* Added color to the program.
* Change the X,Y on the status line to be Y,X.
Version 3.0 has changed the following:
* Converted to Turbo Pascal 5.0.
* The maximum length of the file is limited only to the
size of RAM.
* Many of the bugs in 2.0 have been corrected.
Version 2.0 has changed the following:
* The program was rewritten in Turbo Pascal 4.0.
* A Help Menu has been include providing help on some
most commonly used batch file commands.
-15-
Version 1.30 has changed the following:
* When copying (F3) the line above, the cursor now goes
next line.
* Corrected an error when attempting to center (F4) a
blank line.
* Added cursor X and cursor Y (file line) to the status
line.
* Added Insert Line (Ctrl N).
* Added Delete Current Line (Ctrl Y)
Version 1.20 has changed the following:
* Better memory allocation.
* Limit file size to 500 lines maximum
* CopyCon will now load existing files.
-16-
The JBT ToolBox
The program you are using is one of several programs that I have
written that are either public domain or shareware.
These programs have appeared on bulletin boards, distributed by
ShareWare clearing houses and are included in several of the
Dvorak-Osborne series of books.
Most users of these programs are not aware that the other
programs that I have written exist.
I have created The JBT Tools to provide an interface that allows
all my programs to be used.
The following is the programs included in the JBT Tools and a
brief description of each program.
EzDoss
EzDoss is a Dos Shell. As with all Dos shells actions
can be taken on multiple files. I have used many Dos
shells in the past and they have many features that are
great. Unfortunately, all these features are not
included in one shell. Therefore, I wrote EzDoss to
include the features I like the best. Some of the
features are:
Copying/Moving
When copying or moving files and there is a
file with the same name on the destination,
most Dos Shells offer only "Overwrite"
option.
EzDoss provides several options. They are:
OverWrite:
This option is typical. It will
overwrite any the file on the
destination with the file on the
source.
Newer:
This option will copy/move the file
to the destination only if the file
on the destination is OLDER than
the file on the source.
Copy/Rename:
This option will rename the file on
the destination and copy the file
from the source.
Rename/Copy:
This option will rename the source
file, then copy the file to the
destination.
These options provide the most flexible
options when copying or moving files.
-17-
Tagging Files:
Multiple files can be "tagged". Besides
tagging individual files, all files can be
tagged, files can be tagged by specifying a
"pattern" or by selecting a date in which
files newer, older, same or a combination
will be tagged.
Help System:
EzDoss's manual is online. Help for the
current function can be displayed by
depressing function key F1. Depressing Alt F1
will display the list of help "topics". There
are over fifty (50) help "topics".
Zip Management:
Many of public domain/shareware users access
bulletin boards. Files downloaded from these
boards are compressed into a "ZIP" file.
EzDoss allows files to be "zipped", "zipped"
files to be "unzipped" and to display files
within a "zip". Those files displayed within
a "zip" can be "tagged" and "unzipped",
viewed on the screen or deleted from the zip
file.
Disk Sort:
When files are displayed, they can be sorted
eight (8) different ways. This does not sort
the files on the disk.
EzDoss DOES provide a public domain program
that can be called from within EzDoss that
will sort the disk.
Search:
EzDoss comes with EzFind. EzFind will search
any non executable files for a string. This
can be used to find a key word within
wordprocessing files that are not ASCII.
These are just a few of the many features that EzDoss
has. I use this program every day, and I am sure you
will find it as useful.
EzEdit:
EzEdit is a text editor. The file to be edited/created
is displayed in a window. EzEdit can have multiple
windows opened.
A block of text can be copied to the "clipboard" where
the text can be copied/moved into other files.
-18-
Windows moveable and resizeable. A pop up calculator
and ASCII chart also come with the program.
EzView:
EzView will display an ASCII file in a window. EzView
can have multiple windows opened.
Windows are moveable and resizeable.
EzLocate:
EzLocate is a file finder program. Multiple drives can
be scanned for files which meet the user specified
masks. Multiple masks can be specified.
EzLocate can also look inside ARC and ZIP files for the
user specified masks.
Find Duplicates:
Find Duplicates is a program that can scan multiple
disk drives and find all the files with duplicate file
names. Once the drive(s) have been scanned, the
duplicate files are displayed on the screen. Each file
can be viewed (ASCII only), renamed, suspend to DOS in
that file's subdirectory or "tagged" for deletion.
Find Duplicates can list duplicate files that are
stored in ARC and ZIP files. If your PC has PKZIP and
ARC or PKUNPAK, those duplicate files can be deleted
within the ZIP or ARC files.
Back Off!:
Back Off! is an utility that you will use on a weekly
basis. Back Off! is a multiple file extension deletion
program. It will search any and all drives for files
ending with extensions matching a previously prepared
list. (i.e. .BAK, .CHK, .$$$).
Back Off! will show you the matching filenames and
their locations, and give you the option of viewing
them and/or "tagging" and deleting them.
CopyCon:
When I first used a MSDOS PC, I wrote small batch files
using COPY CON command from the Dos prompt. If I had a
dime for every time i goofed and had to start over
again, I would be a rich man. I wrote CopyCon to help
me write small batch files.
CopyCon has grown since version 1.00 and now not only
allows simple batch files to be created/edited, but
allows graphic boxes, ASCII characters to be inserted
and line centering.
-19-
One of the most important features of CopyCon is the on
line help. Not only does the help provide information
on how CopyCon works, but it is a reference on batch
file commands including examples.
Also included are two small programs that can be used
in batch files and two useful batch files. They are
STATUS.BAT which will read your PC and list out its
status. The other batch file is MENU.BAT which is a
menuing system that is all set up.
You will find that these programs will increase your
productivity and make using your PC easier.
The following page is an INVOICE that you can order the JBT
Tools from:
JBT TOOLS INVOICE
Remit to: From:
JB Technology Inc. __________________________
28701 N. Main St.
Ridgefield, Wa. 98642 __________________________
(206) 887-3442
__________________________
__________________________
Contact Individual
__________________________
__________________________
Quantity Unit Price Total
_______ JBT Tools Software $35.00 ___________
_______ JBT Tools Manual $20.00 ___________
(Laser Quality)
Total ___________
I want 5 1/4" _______ 3 1/2" _______ diskette. (Check One)
Note that The JB Tools computer software has been delivered
and accepted by the customer. Upon receipt of paid invoice,
a current disk will be sent.